cmake_minimum_required(VERSION 3.19)
project(QT3D_Demo)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
# Find includes in corresponding build directories
set(CMAKE_INCLUDE_CURRENT_DIR ON)
# Instruct CMake to run moc automatically when needed.
set(CMAKE_AUTOMOC ON)
# Instruct CMake to run uic automatically when needed.
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTORCC ON)
set(UI_FILES)
set(RC_FILES)
set(QRC_FILES)
set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} D:\\Qt\\5.15.2\\msvc2019_64\\lib\\cmake)
# This will find the Qt files.
find_package(Qt5 REQUIRED COMPONENTS Core Widgets Xml OpenGL 3DCore 3DExtras 3DRender)
find_package( Qt5Widgets REQUIRED)
find_package( Qt5Core REQUIRED)
find_package( Qt5Gui REQUIRED)
find_package( Qt53DCore REQUIRED)
find_package( Qt53DExtras REQUIRED)
find_package( Qt53DRender REQUIRED)
add_executable(QT3D_Demo main.cpp qlinemesh.cpp qjsonmesh.cpp)
target_link_libraries(QT3D_Demo Qt5::Widgets)
target_link_libraries(QT3D_Demo Qt5::Core)
target_link_libraries(QT3D_Demo Qt5::Gui)
target_link_libraries(QT3D_Demo Qt5::3DCore)
target_link_libraries(QT3D_Demo Qt5::3DExtras)
target_link_libraries(QT3D_Demo Qt5::3DRender)